Xbasic

OBJECT.ARCHIVE Function

Syntax

.Archive(c layoutname [,c filter [,c order ]])

Object_Type.ARCHIVE( layoutname as C [, filter as C [, order as C [, argument as SQL::Arguments ]]] )

Arguments

Object_Type

This word can be any of the following:

"Browse"
"Form"
"Label"
"Letter"
"Report"
layoutname

The name of a form, browse, label, letter, or report layout.

filter

Optional. Default = all records. An expression that selects records.

order

Optional. Default = record order number. An expression that order the selected records.

argument

Optional. Default = NULL_VALUE(). Arguments that retrieve value(s) from variable(s) or prompts for value(s) at runtime. Only applicable to SQL Reports. Refer to SQL::Arguments Object.

options

Optional. Default = NULL_VALUE(). Sets filter (WHERE) and order (ORDER BY) expressions for a query against a passive-linked table. A pointer dot variable with 2 elements. Refer to Using the Options Argument.

.filter = Adds to the WHERE clause in the underlying SQL expression.
.order = Replaces the ORDER BY clause in the underlying SQL expression.

Description

Generates a PDF for the specified layout.

Discussion

The <OBJECT>.ARCHIVE() method prints Layout_Name to file in the .PDF format. Filename is the name of the archive file created. The format of filename is " layoutname (mm-dd-yy hh-mm AM).pdf ". The archive file is stored in a folder called "Archive" off the folder in which the current .adb file is stored. Use the Adobe Acrobat Reader to view these archived files.

Example

This script creates an archived copy of the Invoice report.

:Report.archive("Invoice")

This script creates an archived copy of the Invoice report with an argument. You can add as many arguments to the arguments collection as you want.

:Report.archive("Invoice")
DIM myargs as SQL::arguments
 myargs.add("whatcity","London") 
 report.preview("report1", "", "", .f., .f., myargs)

Limitations

Desktop applications only.

See Also